package cn.tedu.review;
/**本类用于回顾构造函数*/
public class TestConstructor {
    public static void main(String[] args) {
       BMW b = new BMW();
       Car c = new Car();
       Car c2 = new Car(666);
       Car c3 = new Car("雪佛兰",80000,3);
    }
}
class Car{
    String brand;
    double price;
    int carAge;
    public Car (){
        System.out.println("我是无参构造");
    }
    public Car(int n){
        System.out.println("我是含参构造");
    }

    public Car(String brand, double price, int carAge) {
        this.brand = brand;
        this.price = price;
        this.carAge = carAge;
        System.out.println("我是全参构造");
    }
}
class BMW{

}